﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DangNhap.aspx.cs" Inherits="WebBanThuoc.admin.DangNhap" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Đăng nhập Admin</title>
        <link rel="shortcut icon" href="../img/admin.ico"></link>
        <script src="../js/jquery-1.7.2.js" type="text/javascript"></script>
        <script src="../js/jquery.keyfilter.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="../style/static.css"/>
        <link rel="stylesheet" type="text/css" href="../style/dangnhap_btn.css"/>
        <style type="text/css">
            .f_span-74
            {
                width:370px; 
                float:none;		
                padding: 20px;
            }
            input, textarea {
                -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
                -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
                -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
                -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
                -o-transition: border linear 0.2s, box-shadow linear 0.2s;
                transition: border linear 0.2s, box-shadow linear 0.2s;
                line-height: 18px;
                color: #555;
                border: 1px solid #CCC;
                -webkit-border-radius: 3px;
                border-radius: 3px;
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                font-size: 15px;
                height: 20px;
                font-weight: normal;
                width: 358px;
            }
            .inputEmail
            {
                height:24px;
            }
            .thai_font
            {
                font-family:"Helvetica Neue", Helvetica, Arial, sans-serif	
            }
            .thai_font_DN
            {
                font-size:20px;
                font-weight:bold;
                padding:10px 0px 16px;		
                color:#0088CC;
                width:320px;
                float:left;
            }
            .thai_font_lable
            {
                font-size:14px;
                font-weight:bold;
                padding-bottom:3px;
            }

        </style>
        <script language="javascript" type="text/javascript">

            $(function () {
                setTimeout(function () {
                    $('#txt_User').focus();
                }, 600);
            });
            function CheckRegisterFormEmail(e) {
                var strEmail = $(e).val();

                regem = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
                return regem.test(strEmail)

            }
            function CheckLoginForm() {
                if ($.trim($('#txt_User').val()) == "") {
                    alert("Bạn chưa nhập Tên đăng nhập.");
                    $('#txt_User').focus();
                    return false;
                }
                if ($.trim($('#txt_Password').val()) == "") {
                    alert("Bạn chưa nhập Mật khẩu.");
                    $('#txt_Password').focus();
                    return false;
                }
            }
            function txtFocus() {
                $('#txt_User').focus();
            }
            function cleanFrom() {
                $('#txt_User').val('');
                $('#txt_Password').val('');
            }
        </script>
</head>
<body>
                        
        <form name="frm_DangNhap" runat="server" method="post">
            <% if (Session["cleanFrom"] != null && (bool)(Session["cleanFrom"]) == true) 
               { %>               
               <script type="text/javascript">
                   $(function () {
                       setTimeout(function () {
                           cleanFrom();  
                       }, 1000);
                   });
                                 
                </script> 
               <% Session.Remove("cleanFrom");
               } %>
            <input name="action" value="Login" type="hidden"/>
            <div style="float: none; margin: 40px auto;" class="f_span-74">
                <div style="width:100%">&nbsp;</div>
                <div style="width:100%;text-align:left">
                    <div class="thai_font thai_font_DN">ĐĂNG NHẬP ADMIN</div>
                    <div style="width:50px; text-align:right; float:right">
                        <a href="../../" ><img alt="" src="../img/home.png" title="Trang Chủ"/></a>
                    </div>
                </div>
                
                <div style="width:100%;text-align:center">
                    <div style="float:left" class="thai_font_lable">Tên đăng nhập:</div>
                    <input type="text" name="txt_User" id="txt_User" maxlength="50" tabindex="1"  value="<%= Request.Params["txt_User"]%>" autocomplete="off" />
                    </div>
                    <div style="width:100%;text-align:center">
                        <div style="float:left" class="thai_font_lable">Mật khẩu:</div>
                        <input type="password" name="txt_Password" id="txt_Password" maxlength="50" tabindex="2"/>
                    </div>
                <% if (Session["loginFail"] != null)
                   {  %>
                    <div style="width:100%;text-align:center">
                        <div style="float:right; text-align:right;margin-right:5px;color:#F00;font-size:14px; width:95%; height:30px" class="thai_font_lable">Tên đăng nhập hoặc Mật khẩu không đúng.</div>            
                    </div>
                <% Session.Remove("loginFail");
                   } %>
                <div style="width:100%;text-align:center; padding-top:8px;">
                    <div style="float:left" class="thai_font_lable">
                        <input type="submit" name="btn_DangNhap" value="Đăng nhập" onclick="return CheckLoginForm();" id="btn_DangNhap" class="btn btn-large btn-primary" tabindex="3"/>            
                    </div>                    
                </div>
                <div style="width:100%;text-align:left; padding-top:8px;float:left;color:Tomato;">
                    Đây là trang đăng nhập quyền Quản trị website
                </div>
            </div>
        </form>
</body>
</html>
